#include<bits/stdc++.h>
using namespace std;

int dx[] = {-1, 0, 0};
int dy[] = {0, 1, -1};
int n;
int ans;
bool vis[60][60];

void dfs(int x, int y, int step)
{
	if(step == n)
	{
		ans++;
		return ;
	}
	for(int i = 0;i < 3;i++)
	{
		int xx = x+dx[i];
		int yy = y+dy[i];
		if(!vis[xx][yy])
		{
			vis[xx][yy] = 1;
			dfs(xx, yy, step+1);
			vis[xx][yy] = 0;
		}
	}
}

int main()
{
	cin>>n;
	vis[25][25] = 1;
	dfs(25, 25, 0);
	cout<<ans;
	cout<<endl;
	system("pause"); 
	return 0;
}

